const Koa = require('koa')
const app = new Koa()
// 中间件
app.use(async (ctx, next) => {
    console.log(1)
    await next()
    ctx.body = 'Hello Zhihu API'
    console.log(2)
})

app.use(async (ctx, next) => {
    console.log(3)
    await next()
    console.log(4)
})
app.use((ctx) => {
    console.log(5)
})
// 1 3 5 4 2
app.listen(3000)